package com.yycx.bpm.provider.service;

import com.yycx.bpm.client.entity.FlowProcess;
import com.yycx.common.mybatis.base.service.IBaseService;
import com.yycx.common.mybatis.model.ResultBody;
import org.flowable.engine.impl.persistence.entity.DeploymentEntityImpl;

/**
 * 流程表 接口
 *
 * @author flyme
 * @date 2020-06-11
 */
public interface FlowProcessService extends IBaseService<FlowProcess> {
    /**
     * 上传流程后添加自定义流程定义记录
     *
     * @param deploymentEntity
     * @param processXml
     */
    void addProcess(DeploymentEntityImpl deploymentEntity,String processXml);

    /**
     * 上传流程后添加自定义流程定义记录
     *
     * @param deploymentEntity
     * @param processXml
     */
    void importProcess(DeploymentEntityImpl deploymentEntity,String processXml);

    /**
     * 删除流程
     *
     * @param procDefId
     * @return
     */
    ResultBody deleteByProcDefId(String procDefId);

    /**
     * 部署流程
     *
     * @param procModelId
     * @param processId
     * @return
     */
    ResultBody deployModel(String procModelId, String processId);

    /**
     * 根据key查询流程定义
     *
     * @param processKey
     * @return
     */
    FlowProcess getByProcessKey(String processKey);
}
